package com.pactera.asmp.server.dao;

import com.pactera.asmp.server.entity.IssueChartVO;
import com.pactera.asmp.server.entity.IssueSearchDTO;
import com.pactera.asmp.server.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ProjectName: asmpserver
 * @Package: com.pactera.asmp.server.dao
 * @ClassName: IssueMap
 * @Author: lvzhiqiang
 * @Description: Issue Mapper
 * @Date: 2019/8/1 15:24
 * @Version: 1.0
 */
@Mapper
public interface IssueMapper {

    int deleteByPrimaryKey(Integer id);

    int deleteByPrimaryKeys(@Param("datas") List<Integer> datas);

    int insert(Issue record);

    int insertSelective(Issue record);

    Issue selectByPrimaryKey(Integer id);


    /**
     * @Method 分页查询异常数据
     * @Description 分页查询异常数据,或查询符合条件的数据
     * @param: [IssueSearchDTO]
     * @return: List<IssueSearchDTO>
     * @auther: lzq
     * @date: 2019/8/1 16:12
     */
    List<IssueSearchDTO> getIssue(@Param("issueSearch") IssueSearchDTO userSearch);


    /**
     * @Method getChartData
     * @Description 查询图表数据
     * @param:
     * @return: PieChart
     * @auther:
     * @date:
     */
    PieChart getChartData(@Param("projectName") String projectName);

    PieChart getProblemCount(@Param("projectName") String projectName, @Param("versionData") String versionData);

    /**
     * @Method getTopProblemList
     * @Description 查询前十问题模块
     * @param:
     * @return: ExceptionData
     * @auther:
     * @date:
     */
    List<ProcessInfo> getTopProblemList(String projectName);

    List<IssueChartVO> getIssueChartLineByProject(String projectName);
    List<IssueChartVO> getIssueChartBarByProject(String projectName);

    List<IssueChartVO> getIssueProcessNameByProject(String projectName);

    List<IssueReportInfo> reportIssue(@Param("issueSearch") IssueSearchDTO userSearch);

    List<DeviceIssueInfo> reportDeviceIssue(@Param("issueSearch") IssueSearchDTO userSearch);

}
